<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>陈亮 2021-07-14 2:19-</title>
    <link rel="stylesheet" href="./liang.css">
    <style>
        .nav {
            height: 30px;
            margin: 20px 0;
            background-color: #eee;
        }

        .introduce {
            width: 100px;
            height: 50px;
            background-color: darkcyan;
            margin-left: 100px;
            margin-right: 50px;
            line-height: 50px;
            font-size: 20px;
            text-align: center;
            color: white;
            transform: skew(-15deg);
        }
        ul>li:not(:first-child){
            margin: 0 10px;
            font-size: 14px;
            cursor: pointer;
        }
        ul>li:not(:first-child):hover{
            color: red;
        }
    </style>
</head>

<body>
    <ul class="nav flex a-c">
        <li class="introduce">课程</li>
    </ul>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script>
        function loadMaenu(){
$.get(`./menu.json`,function(res){
let {data}=res
data.forEach(r => {
    let li=$(`<li>`)
        li.html(r.name)
        $(`.nav`).append(li)
})
        })
    }
        loadMaenu()
    </script>
</body>

</html>